#include "vtkImageReader.h"
#include "vtkPNGReader.h"
#include "vtkImagePermute.h"
#include "vtkImageViewer.h"
#include "vtkRenderWindowInteractor.h"

// int main()
int main20250801()

{
	vtkPNGReader *reader = vtkPNGReader::New();
	reader->SetDataByteOrderToLittleEndian();
	reader->SetFileName("E:/DesktopFiles/AIW_VTK/data/VTK-logo.png");

	vtkImagePermute *permute = vtkImagePermute::New();
	permute->SetInputConnection(reader->GetOutputPort());
	permute->SetFilteredAxes(1, 0, 2);

	vtkImageViewer  *viewer = vtkImageViewer::New();
	viewer->SetInputConnection(permute->GetOutputPort());
	viewer->SetColorWindow(256);
	viewer->SetColorLevel(128);
	viewer->SetSize(256, 256);

	vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
	viewer->SetupInteractor(iren);

	iren->Initialize();
	iren->Start();

	return 0;
}
